<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRevenueStatementsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('revenue_statements', function (Blueprint $table) {
            $table->id();
            $table->decimal('income')->default(0.00)->comment('收入');
            $table->decimal('expenditure')->default(0.00)->comment('收入');
            $table->string('date_time')->default('2023/07')->comment('月份');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `revenue_statements` comment '营收统计'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('revenue_statements');
    }
}
